<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="common::header"></head>
<body>
	<div class="layui-fluid">
		<div class="layui-row">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-card-header t-title layui-bg-cyan mlk-title">组织部门管理</div>
					<div class="layui-card-body">
						<table class="layui-table" id="deptTree" lay-filter="deptTree" style="height:100%;"></table>
					</div>
				</div>
			</div>
		</div>
	</div>
<!-- 树形下拉框 -->
<div id="uldialog" class="mlk-hide">
	<ul id="ultree"></ul>
</div>
<!-- 新增部门弹出层 -->
<div class="mlk-hide layui-fluid" id="addDept">
	<form class="layui-form layui-form-pane" method="post" lay-filter="formFilter">
	  <div class="layui-form-item">
	    <label class="layui-form-label">部门名称</label>
	    <div class="layui-input-block">
	      <input type="text" name="name" required  lay-verify="required" placeholder="请输入部门名称" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">排列顺序</label>
	    <div class="layui-input-block">
	      <input type="text" name="seq" required  lay-verify="required|number" placeholder="请输入排列顺序" autocomplete="off" class="layui-input">
	    </div>
	  </div>
	  <div class="layui-form-item">
	    <label class="layui-form-label">选择父级部门(默认为顶层部门)</label>
	    <div class="layui-input-block">
	      <a href="#" class="layui-btn" id="deptSelect"><span>默认为顶级部门</span></a>
	      <input type="hidden" name="parentId" id="parentId">
	    </div>
	  </div>
	  <div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">备注信息</label>
	    <div class="layui-input-block">
	      <textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
	    </div>
  	  </div>
  	  <div class="layui-form-item">
	    <div class="layui-input-block">
	      <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
	      <button type="reset" class="layui-btn layui-btn-primary" id="reset">重置</button>
	    </div>
	  </div>	  
	</form>
</div>
<!-- 编辑部门弹出层 -->
<div class="mlk-hide layui-fluid" id="editDept">
	<form class="layui-form layui-form-pane" method="post" lay-filter="editFormFilter">
		<input type="hidden" name="id">
		<div class="layui-form-item">
			<label class="layui-form-label">部门名称</label>
			<div class="layui-input-block">
				<input type="text" name="name" required  lay-verify="required" placeholder="请输入部门名称" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">排列顺序</label>
			<div class="layui-input-block">
				<input type="text" name="seq" required  lay-verify="required|number" placeholder="请输入排列顺序" autocomplete="off" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">备注信息</label>
			<div class="layui-input-block">
				<textarea name="remark" placeholder="请输入备注信息" class="layui-textarea"></textarea>
			</div>
		</div>
		<div class="layui-form-item">
			<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="editForm">立即提交</button>
		</div>
	</form>
</div>
</body>
<script type="text/html" id="tool">
<a href="#" class="layui-btn layui-btn-sm layui-btn-warm" lay-event="edit">编辑</a>
<a href="#" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delete">删除</a>
</script>
<script type="text/html" id="toolbar">
<button class="layui-btn" lay-event="add">添加新部门</button>
</script>
<div th:include="common::footer"></div>
<script type="text/javascript" th:src="@{/js/rbac/dept.js}"></script>
</html>